package hong;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;

import java.io.File;
import java.io.FileReader;

/**
 */
public class MainApp extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception {
        Constants.initData();
        try {

//            Pane root = FXMLLoader.load(getClass().getClassLoader().getResource(url));
            Pane root = FXMLLoader.load(Constants.timeDesktopFXML);
            Scene scene = new Scene(root, 500, 500);
            primaryStage.setScene(scene);
            primaryStage.setTitle("倒计时");
            primaryStage.setMaximized(true);
            primaryStage.show();
            primaryStage.setOnCloseRequest((WindowEvent e)->{
                System.exit(0);
            });
        } catch(Exception e) {
            e.printStackTrace();
        }

    }

    public static void main(String[] args) {
//        System.setProperty("jdk.gtk.version","2");
        launch(args);
    }
}